class smx_node_type ( $type = 'UNSET' ) {
  require smx_os

  if $type == 'UNSET' {
    $provision = "provision.sh"
    $post_provision = "post_provision.sh"
  }
  else {
    $provision = "provision_node_$type.sh"
    $post_provision = "post_provision_node_$type.sh"
  }

  file { '/vagrant/vagrant/provision.sh':
    ensure => present,
    mode   => 755, group => root, owner => root,
    source => "puppet:///modules/smx_node_type/$provision",
  }

  file { '/vagrant/vagrant/post_provision.sh':
    ensure => present,
    mode   => 755, group => root, owner => root,
    source => "puppet:///modules/smx_node_type/$post_provision",
  }
}
